#version 300 es
precision mediump float;
precision highp int;

layout(std140) uniform fs1
{
    highp float v_value;
} _71;

uniform mediump sampler2D u_tex0;

in highp vec4 v_fragmentColor;
in highp vec2 v_texCoord;
layout(location = 0) out highp vec4 FragColor;

highp vec3 photoshop_desaturate(highp vec3 color, highp float value)
{
    highp float bw = (min(color.x, min(color.y, color.z)) + max(color.x, max(color.y, color.z))) * value;
    return vec3(bw, bw, bw);
}

void main()
{
    highp vec4 image = vec4(v_fragmentColor * texture(u_tex0, v_texCoord));
    highp vec3 param = image.xyz;
    highp float param_1 = _71.v_value;
    FragColor = vec4(photoshop_desaturate(param, param_1), image.w);
}

